package com.wnxy.test;

import com.wnxy.entity.Employee;
import com.wnxy.mapper.EmployeeMapper;
import com.wnxy.util.DBUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Date;

public class Mytest {
    public static void main(String[] args) {
        SqlSession sqlSession = DBUtil.openSqlSession(true);
        EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
        Employee emp = new Employee();
        emp.setId(68);
        emp.setBirthday(new Date());
        emp.setManagerId(5);
        int row = mapper.updateByCondition(emp);
        if (row>0){
            System.out.println("成功");
        }else {
            System.out.println("失败");
        }
        sqlSession.close();
    }
}
